home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / LISP / AUTOCLAS / SAMPLE / SCRIPT.LIS < prev   
File List  |  1990-07-17  |  3KB  |  105 lines

  1. ;;; -*- Syntax: Common-Lisp; Package: AUTOCLASS; Base: 10; Mode: LISP -*-
  2.  
  3. ;;; NOTE: This script is for the Symbolics Genera environment.
  4.  
  5. ;;; The files in this directory were created by the following process:
  6.  
  7.  
  8. ;;; (1) GET SOME DATA
  9.  
  10. ;we got many data sets from the machine learning repository at UCI
  11.  
  12. tcp ....
  13. get ... 
  14.  
  15. ; resulting data in files:  imports-85.data  and  imports-85.names
  16.  
  17. ;;; (2) CONVERT TO AUTOCLASS FORMAT
  18.  
  19. Rename File imports-85.data to imports-85.db2
  20.  
  21. ; using imports-85.names as a source, create files:
  22. ; imports-85.hd2  and  imports-85.model
  23. ; based on >doc>input.text documentation file
  24.  
  25. ;;; (3) LOAD AUTOCLASS SYSTEM
  26.  
  27. (load "cha:>p>autoclass>load-ac.lisp")
  28.  
  29. (in-package 'ac)
  30.  
  31. ;;; (4) CHECK CORRECTNESS OF INPUT FILES
  32.  
  33. (autoclass-input-check
  34.   :data-file "cha:>p>autoclass>sample>imports-85"
  35.   :header-file "imports-85" :model-file "imports-85")
  36.  
  37. ;at this point a log file was begun:
  38. ;  "cha:>p>autoclass>sample>imports-85&imports-85&imports-85.log"
  39.  
  40. ;could have left this optional step out and the search would have worked
  41.  
  42. ;;; (5) SEARCH FOR GOOD CLASSIFICATIONS
  43.  
  44. (multiple-value-setq (search classifications)
  45.   (autoclass-search :data-file "cha:>p>autoclass>sample>imports-85"
  46.                     :header-file "imports-85" :model-file "imports-85"))
  47.  
  48. ;could have done this instead:
  49. ; (autoclass-search :data-file "cha:>p>autoclass>sample>imports-85")
  50.  
  51. ;type a "q" to stop
  52.  
  53. ;these files will be saved to disk:
  54. ; "cha:>p>autoclass>sample>imports-85&imports-85&imports-85.search"
  55. ; "cha:>p>autoclass>sample>imports-85&imports-85&imports-85.dump"
  56. ;and the .log file will be updated
  57.  
  58. ;;; (6) RESTART SEARCH  
  59.  
  60. ;continue the previous search
  61.  
  62. (autoclass-search :search search)
  63.  
  64. ;could have done:
  65. ;(autoclass-search :search *)
  66.  
  67. ;type a "q" to stop
  68.  
  69.  
  70. ;;; (7) START A NEW SEARCH
  71.  
  72. ;this search starts over, doesn't save to disk, and uses a variation
  73.  
  74. (autoclass-search :clsf (elt classifications 0) :force-new-search-p t
  75.   :results-file-p nil :search-file-p nil :log-file-p nil
  76.   :try-fn (second *try-fn-list*) :max-duration 300)
  77.  
  78. ;it stops itself this time after 5 minutes
  79.  
  80.  
  81. ;;; (8) RESTART THE FIRST SEARCH IN NEW ENVIRONMENT
  82.  
  83. Logout, Halt Machine, Boot, Login
  84.  
  85. (load "cha:>p>autoclass>load-ac.lisp")
  86. (in-package 'ac)
  87.  
  88. (autoclass-search
  89.   :output-files-default "cha:>p>autoclass>sample>imports-85&imports-85&imports-85")
  90.  
  91. ;type a "q" to stop
  92.  
  93.  
  94. ;;; (9) PRINT OUT REPORTS ON WHAT HAS BEEN FOUND
  95.  
  96. (ac-3:autoclass-reports-from-results-file
  97.         "cha:>p>autoclass>sample>imports-85&imports-85&imports-85"     
  98.         :xref-class-report-att-list '(2 5 6))
  99.  
  100. ;these reports show up in:
  101. ; "imports-85&imports-85&imports-85.influ-text"
  102. ; "imports-85&imports-85&imports-85.case-text"
  103. ; "imports-85&imports-85&imports-85.class-text"
  104.  
  105.